import { http } from './http'
import { PageQueryParams, PageResponse } from '@/config/page'

export interface DocRemindCreateParams {

  docId: number;

  emailChannel: boolean;

  noticeChannel: boolean;
}

export interface DocRemindUpdateParams {

  enabled: boolean;

  emailChannel: boolean;

  noticeChannel: boolean;
}

/**
 *
 * @param docId 获取文件提醒
 * @returns
 */
export function getDocRemind (docId: number) {
  return http().get<any>(`/api/document/doc-reminds/doc/${docId}`)
}

/**
 * 创建文档提醒
 * @param params
 * @returns
 */
export function createDocRemind (params: DocRemindCreateParams) {
  return http().post<any>('/api/document/doc-reminds', params)
}

/**
 * 更新文档提醒。
 * @param id
 * @param params
 * @returns
 */
export function updateDocRemind (id: number, params: DocRemindUpdateParams) {
  return http().put<any>(`/api/document/doc-reminds/${id}`, params)
}
